Component({
  data: {
    selected: 0,
    color: "#333333",
    selectedColor: "#e74714",
    list: [{
      pagePath: "/pages/index/index",
      iconPath: "/images/pageimg1.png",
      selectedIconPath: "/images/pageimgxz1.png",
      text: "首页"
    }, {
      pagePath: "/pages/classification/classification",
      iconPath: "/images/pageimg2.png",
      selectedIconPath: "/images/pageimgxz2.png",
      text: "分类"
    },
    {
      pagePath: "/pages/shoppingcart/shoppingcart",
      iconPath: "/images/pageimg3.png",
      selectedIconPath: "/images/pageimgxz3.png",
      text: "购物车"
    },
    {
      pagePath: "/pages/my/my",
      iconPath: "/images/pageimg4.png",
      selectedIconPath: "/images/pageimgxz4.png",
      text: "我的"
    }
  ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      // this.setData({
      //   selected: data.index
      // })
    }
  }
})